import request from '@/plugin/axios'

export function fetchList (query) {
  return request({
    url: '/specification/list/page',
    method: 'get',
    params: query,
    loading: {
      type: 'nprogress',
      interval: 500
    }
  })
}

export function queryDictListByType (query) {
  return request({
    url: '/dict/dictPage?page=1&limit=1000&orderByField=sort&isAsc=true&type=' + query,
    method: 'get'
  })
}

export function addObj (obj) {
  return request({
    url: '/specification/insert',
    method: 'post',
    data: obj
  })
}

export function delObj(id) {
  return request({
    url: '/specification/delete/' + id,
    method: 'delete'
  })
}

export function putObj (obj) {
  return request({
    url: '/specification/update',
    method: 'put',
    data: obj
  })
}




